package com.ocp.macro.exception;

import com.ocp.macro.enums.DataCode;

public class MysqlException extends RuntimeException {

    private DataCode dataCode; // 异常状态

    public MysqlException(){

    }

    public MysqlException(String msg){
        super(msg);
    }

    public MysqlException(DataCode dataCode){
        super(dataCode.getMessage());
        this.dataCode = dataCode;
    }

    public DataCode getDataCode(){
        return this.dataCode;
    }
}
